Codegen failed

If you get a message like this, especially with the text "Sometimes the files are locked by VS - please try again.", the most likely solution is to close all tabs in VS that show generated code. For example, close all tabs and restart VS to be sure no files are locked.

Codegen failed.png

If you happen to have a Solution Items node in your project - you should remove it. Not sure who put it there but it has been reported that Codegen stumbles if this is present.

ImageCodeGenSolItem.png

See also: Code generation not working, Codegen Issues .net standard


ObsoleteYOUNEEDTOACT

When you see an attribute named ObsoleteYOUNEEDTOACT in your generated code it is because the codegen logic discovered an existing method in your code with a UmlElement id value that does not exist in this uml class - or if it exists is implemented with ocl/eal via an expression in its body property. We deliberately inject this non compiling code-gen-attribute in order to help you clean up model methods from c# code that no longer should be there according to your uml model. If a UmlElement id element is left in the code when it does not have a representation in the model you will get issues when comparing checksums created via code reflection (MDriven framework compiled code) vs checksum created via model (MDrivenServer, Prototyping) and this may lead to MDrivenServer refusing to let your application to save data to the database.

This page was edited 99 days ago on 08/10/2024. What links here